﻿using UnityEngine;
using System.Collections;

public class MortJoueur : MonoBehaviour {

	public Camera cam1;
	public Camera cam2;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void Mort()
	{
		Application.LoadLevel ("Niveau1");
	}

	void OnTriggerEnter2D( Collider2D coll){
		if (coll.gameObject.tag == "player") 
		{
			cam1.enabled = false;
			cam2.enabled = true;
			Invoke("Mort",5);
		}
	}
}
